package com.olympus.hermes.order.controller;

import com.olympus.hermes.common.support.PageRequest;
import com.olympus.hermes.order.domain.Order;
import com.olympus.hermes.order.service.OrderService;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Mickey
 * @since 2021/2/3
 */
@RestController
@RequestMapping("/order")
@AllArgsConstructor
public class OrderController {

    private final OrderService orderService;

    @GetMapping("/list")
    public Page<Order> list(PageRequest pageRequest) {
        return orderService.list(pageRequest);
    }
}
